package com.vx.data.dataCloud.hystrix;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;

/**
 * 访问 http://localhost:7011/hystrix/ 查看Hystrix Dashboard面板
 * Created by aofavx on 2017-8-9.
 */
//启用Hystrix Dashboard功能。
@EnableHystrixDashboard
@SpringBootApplication
//启用eureka客户端功能，注册到eureka服务
@EnableDiscoveryClient
//开启断路由功能，并且可以通过Hystrix监控面板查看访问情况
@EnableCircuitBreaker
public class HystrixDashBoard {
    public static void main(String[] args) {
//        new SpringApplicationBuilder(HystrixDashBoard.class).web(true).run(args);
        SpringApplication.run(HystrixDashBoard.class, args);
    }
}
